package com.woniuxy.three.pms.roomtype.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.woniuxy.three.pms.roomtype.service.IRoomTypeService;

@Component
@Lazy(false)
public class CronController {
	
	@Autowired
	private IRoomTypeService service;
	
	
	@Scheduled(cron="0 0 12 * * ?")
	 public void changeRoomStock() { 
		System.out.println("定时修改开始");
		boolean boo = service.changeStock();
		System.out.println(boo+"  修改结束"); 
		}
	@Scheduled(cron="0 */1 * * * ?")
	 public void Test() { 
		
	}
	
}
